<template>
    <div>
        <div style="display: flex;align-items: center;cursor: pointer;" @click="drawer = true">
            <el-avatar size="medium" :src="agentDetails.avatar" style="margin-right: 10px"></el-avatar>
           <div style="font-size: 12px;">  {{ agentDetails.name }} </div>
        </div>
        <el-drawer title="我是标题" :visible.sync="drawer" :with-header="false" >
            <div style="display: flex;align-items: center;flex-direction: column;margin-top: 50px;">
                <el-avatar :size="70" :src="agentDetails.avatar" style="margin-right: 10px;text-align: center;"></el-avatar>
                <div style="font-size: 25px;color: black;text-align: center;margin-bottom: 20px;">
                    {{ agentDetails.name }}
                </div>
            </div>
            <el-descriptions class="margin-top" title="" :column="2"  :border="true" style="text-align: center;">
                <el-descriptions-item style="text-align: center;">
                    <template slot="label">
                        区号
                    </template>
                    {{ agentDetails.country_code }}
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">
                        手机号
                    </template>
                    {{ agentDetails.mobile }}
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">
                        性别
                    </template>
                    {{ agentDetails.gender == 0? "未知" : agentDetails.gender == 1? "男" : "女"  }}  
                    <!-- 0未知 1男 2女 -->
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        姓名
                    </template>
                    {{ agentDetails.cert_name}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        身份证号码
                    </template>
                    {{ agentDetails.cert_no}} 
                </el-descriptions-item>

             
                <el-descriptions-item>
                    <template slot="label">
                        vip等级
                    </template>
                   {{ agentDetails.vip_level}}
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">
                        vip失效时间
                    </template>
                    {{ agentDetails.vip_expire}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        密码
                    </template>
                    {{ agentDetails.password}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        在线状态
                    </template>

                    <text v-if="agentDetails.online == 0">0</text>
                    <text v-else-if="agentDetails.online == 1">1</text>
                    <text v-else-if="agentDetails.online == 2">2</text>
                    <text v-else>3</text>
             
                </el-descriptions-item>

                <el-descriptions-item :span="1">
                    <template slot="label">
                        邀请码
                    </template>
                    {{ agentDetails.invitation_code}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        父级用户
                    </template>
                    {{ agentDetails.parent_id}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        可用余额
                    </template>
                    {{ agentDetails.balance}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        提现余额
                    </template>
                    {{ agentDetails.withdraw_balance}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        禁用状态
                    </template>
                    {{ agentDetails.disable == 0 ? "正常" :"禁用"}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        资金密码
                    </template>
                    {{ agentDetails.fun_password}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        青少年模式密码
                    </template>
                    {{ agentDetails.teenager_password}} 
                </el-descriptions-item>

                <!-- <el-descriptions-item>
                    <template slot="label">
                        <i class="el-icon-office-building"></i>
                        背景地址
                    </template>
                    {{ agentDetails.background}} 
                </el-descriptions-item> -->

                <el-descriptions-item>
                    <template slot="label">
                        是否主播
                    </template>
                    {{ agentDetails.is_anchor == 0? "否":"是"}} 
                </el-descriptions-item>


                <el-descriptions-item>
                    <template slot="label">
                        个人简介
                    </template>
                    {{ agentDetails.subtitle}} 
                </el-descriptions-item>

             

                <el-descriptions-item>
                    <template slot="label">
                        所在城市
                    </template>
                    {{ agentDetails.city}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        登录IP
                    </template>
                    {{ agentDetails.login_ip}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        登录时间
                    </template>
                    {{ agentDetails.login_at}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        登录地址
                    </template>
                    {{ agentDetails.login_address}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        是否认证
                    </template>
                    {{ agentDetails.authentication}} 
                </el-descriptions-item>

              

                <el-descriptions-item>
                    <template slot="label">
                        开启私人定制
                    </template>
                    {{ agentDetails.customized == 0? "否":"是"}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        注册IP
                    </template>
                    {{ agentDetails.register_ip}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        注册地址
                    </template>
                    {{ agentDetails.register_address}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        MAC地址
                    </template>
                    {{ agentDetails.mac}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        设备型号
                    </template>
                    {{ agentDetails.model}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        终端号码
                    </template>
                    {{ agentDetails.terminal}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        创建时间
                    </template>
                    {{ agentDetails.created_at}} 
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">
                        用户标签
                    </template>

                    <el-tag type="success" style="margin-right: 10px;" v-for="(item,index) in agentDetails.labels" :key="index"> {{ item}} </el-tag>
                   
                </el-descriptions-item>

            </el-descriptions>


        </el-drawer>
    </div>
</template>

<script>
export default {    
    props:{
        agentDetails: {
            type: Object,
        },
    },
   watch:{
    agentDetails(){
        
    }
   },
    data() {
        return {
            drawer: false,
        }
    },

    mounted() {
    },
    methods: {
        
    }

}
</script>

<style lang="scss" >

</style>